GBML manual / Constants

DISTORT_LEAN_FORWARD

Tipped forward: the sprite is full width at the top and narrower toward the bottom.

Works differently on Game Boy - The Game Boy narrows a picture by moving its two sprite pieces toward each other on the lines the look names, so the middle of the line is covered instead of squeezed; 16 pixels wide at most, one bent picture at a time.

Works differently on Game Boy Color - The Game Boy Color narrows a picture by moving its two sprite pieces toward each other on the lines the look names, so the middle of the line is covered instead of squeezed; 16 pixels wide at most, one bent picture at a time.

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

DISTORT_LEAN_FORWARD: constant

<!-- GENERATED by tools/gbabel_looks.py from its LOOKS registry. Never edit this page: change the registry and re-run it. -->

Description

Names the tipped-forward sprite, for sprite_distort. The top row is drawn at its real width and each row below it is a little narrower, so the bottom looks further away. The same curve SPRITE_LEAN_FORWARD draws for draw_sprite_3d.

strength is how much narrower the narrowest row is than the sprite: 1 is about four fifths of its width, 2 about two thirds and 3 a little over half. No row is ever drawn wider than the sprite, so no row is cut off at the sides.

A real capture, four pictures of the same gold plank - straight, then tipped toward you at strength 1, strength 2 and strength 3 (the bottom gets narrower each time, the top stays full width)A real capture, four pictures of the same gold plank - straight, then tipped toward you at strength 1, strength 2 and strength 3 (the bottom gets narrower each time, the top stays full width)
A real capture, four pictures of the same gold plank - straight, then tipped toward you at strength 1, strength 2 and strength 3 (the bottom gets narrower each time, the top stays full width)

The same picture four times: straight, then strength 1, 2 and 3 from left to right, each one standing still where the pattern had got to. Real pictures from a Game Boy Advance ROM.

This look also squeezes the picture from top to bottom a little, so the picture ends a few rows short: the rows at its bottom are cut away, and the stronger the strength, the more of them. (The hourglass and the jelly change only the width, and keep every row.)

It is made for sprites up to about 32 pixels tall. A taller sprite gets the same shape, held at its strongest 16 rows above and below the middle.

Example

sprite_distort(DISTORT_LEAN_FORWARD, 2, 0);

A sprite leaning towards you at the top. Call it once, for example in the object's Create event - it keeps going by itself until you call sprite_distort(DISTORT_NONE, 0, 0) or the object is destroyed.

See also: sprite_distortDISTORT_NONEDISTORT_LEAN_BACK